package com.tengju.bff.interfaces.covercharge.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tengju.bff.interfaces.covercharge.entity.po.ServiceSign;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tengju.bff.interfaces.covercharge.entity.vo.ServiceSignQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 * 服务费经销商签约表 Mapper 接口
 * </p>
 *
 * @author fwy
 * @since 2020-03-04
 */
@Component
public interface ServiceSignMapper extends BaseMapper<ServiceSign> {

    Integer queryTotal(@Param("signingTimeStart") String signingTimeStart,
                       @Param("signingTimeEnd") String signingTimeEnd,
                       @Param("idCode") String idCode,
                       @Param("mobile") String mobile,
                       @Param("userName") String userName,
                       @Param("platformCode") String platformCode,
                       @Param("signName") String signName,
                       @Param("idNumberIdNumber") String idNumberIdNumber,
                       @Param("status") String status,
                       @Param("subStatus") String subStatus,
                       @Param("subStatusIsCe") String subStatusIsCe,
                       @Param("methodCooperation") String methodCooperation);

    List<ServiceSignQuery> queryByPage(Page pagination,
                                       @Param("signingTimeStart") String signingTimeStart,
                                       @Param("signingTimeEnd") String signingTimeEnd,
                                       @Param("idCode") String idCode,
                                       @Param("mobile") String mobile,
                                       @Param("userName") String userName,
                                       @Param("platformCode") String platformCode,
                                       @Param("signName") String signName,
                                       @Param("idNumberIdNumber") String idNumberIdNumber,
                                       @Param("status") String status,
                                       @Param("subStatus") String subStatus,
                                       @Param("subStatusIsCe") String subStatusIsCe,
                                       @Param("methodCooperation") String methodCooperation
    );

    List<ServiceSignQuery> queryByPageExport(
                                       @Param("signingTimeStart") String signingTimeStart,
                                       @Param("signingTimeEnd") String signingTimeEnd,
                                       @Param("idCode") String idCode,
                                       @Param("mobile") String mobile,
                                       @Param("userName") String userName,
                                       @Param("platformCode") String platformCode,
                                       @Param("signName") String signName,
                                       @Param("idNumberIdNumber") String idNumberIdNumber,
                                       @Param("status") String status,
                                       @Param("subStatus") String subStatus,
                                       @Param("subStatusIsCe") String subStatusIsCe,
                                       @Param("methodCooperation") String methodCooperation
    );

    ServiceSignQuery queryOnce(@Param("id") Integer id);

    Integer terminate(@Param("id") Integer id, @Param("currentIdentity") String currentIdentity);

}
